Storage medium having game program stored thereon, game apparatus and input device

ABSTRACT

An origin which is set by a pointing device is drawn and moved according to a player&#39;s operation in order to carry out an operation in which a joystick is emulated, and therefore the operation in which the pointing device is used can be carried out in accordance with the player&#39;s controllability, and further a distance between the origin and a point at which the player operates the pointing device does not become longer than is necessary, and therefore the response to the operation can be improved.

BACKGROUND

1. Field of the Invention

The technology presented herein relates to a storage medium having a game program stored thereon, a game apparatus and an input device, and more particularly to a storage medium in which stored is a game program used for a computer game for which a pointing device such as a touch panel is employed, a game apparatus and an input device.

2. Description of the Background Art

Conventionally, various types of games for which a joystick is used as a controller have been developed. The joystick is provided with a lever, and a player tilts the lever forward and backward, and rightward and leftward, thereby making inputs according to the directions. In general, a direction in which and a degree to which the joystick is tilted are handled by a game apparatus as an input direction and an input quantity, respectively. In a case where the player tilts the joystick lever in a certain direction to a certain degree to hold the joystick lever at that position, the positional information is continuously outputted and handled by the game apparatus as the input direction and the input quantity. The joystick is also used for a typical personal computer as well as used as a controller for a home game apparatus.

On the other hand, an input device which is operated by a player using a touch panel has been also developed, as disclosed in, for example, Japanese Laid-Open Patent Publication No. 11-53115 (Patent Document 1) and Japanese Laid-Open Patent Publication No. 7-182092 (Patent Document 2). With the input device disclosed in the Patent Document 1, as shown in FIG. 1 and FIG. 3 of the Patent Document 1, a player uses a touch panel to utilize, as a direction in which and a speed at which a cursor moves, a direction and a distance from a predetermined origin on the touch panel to a point at which the player is pointing. On the other hand, in the input device disclosed in the Patent Document 2, as shown in FIG. 6 of the Patent Document 2, a game screen is displayed on a display having a touch panel mounted thereon. According to a movement corresponding to a vector quantity of a movement of a finger with which a player touches the touch panel, an object which is selectively touched is moved on the game screen.

Here, if an operation in which a joystick is emulated can be realized for a game apparatus having a touch panel, it is convenient. In this case, information which is eventually required is a vector value of two axes of X and Y corresponding to a joystick input value. The vector value is represented as a vector value (sx, sy) in a stick coordinate system. A direction indicated by the vector value (sx, sy) is a direction in which the joystick is tilted and a length of the vector value is a degree to which the joystick is tilted. Further, the length of the vector value corresponding to the joystick being tilted to the maximum is set as “1”. In this case, sx=−1 to +1 and sy=−1 to +1, and the length of “0” indicates that the joystick is in a neutral (upright) position.

Further, the vector value (sx, sy) in the stick coordinate system can be obtained according to the following formula, using an origin (ox, oy) on the touch panel and a point (tx, ty) at which the player is pressing the touch panel, the origin and the point being represented in the touch panel coordinate system. sx=(tx−ox)×ratio sy=(ty−oy)×ratio where the ratio is a conversion ratio used for defining a length in the touch panel coordinate system, which corresponds to the length “1” in the stick coordinate system. For example, when a length from an origin is “10” in the touch panel coordinate system, the length is defined as “1” in the stick coordinate system. Consequently, the ratio is set as “ratio=1÷10=0.1”.

While the invention disclosed in the Patent Document 1 utilizes, for information processing, a difference between an origin and a point at which a touch panel is being pressed, when the input method of the invention disclosed in the Patent Document 1 is applied as it is to the operation in which a joystick is emulated, various problems arise. With reference to FIGS. 13A to 14C, the problem on the input device disclosed in the Patent Document 1 will be described. In FIGS. 13A to 14C, the horizontal direction is the X axis direction (the rightward direction is the positive direction) and the vertical direction is the Y axis direction (the forward direction is the positive direction) in the touch panel coordinate system. O is the origin in the touch panel coordinate system.

FIGS. 13A and 13B show an example of an operation in which a player uses the touch panel to shift from a stick input vertically in front of the origin (an input for tilting the joystick vertically in front of the origin; an input by which sx=0 and sy>0 is obtained as the stick coordinate values) to a stick input on the right side of the origin (an input for tilting the joystick directly to the right; an input by which sx>0 and sy=0 is obtained as the stick coordinate values). FIGS. 14A to 14C show an example of an operation in which the player uses the touch panel to shift from the stick input on the right side of the origin to a stick input on the lift side of the origin (an input for tilting the joystick directly to the left; an input by which sx<0 and sy=0 is obtained as the stick coordinate values). FIGS. 13A to 14C schematically illustrate a mark representing a hand as a player's hand that presses the touch panel.

In FIG. 13A, in a case where the stick input vertically in front of the origin is performed on the touch panel, the player presses a point T1 (t1 x, t1 y) which is in front of the origin O (ox, oy) (which is in the direction which is parallel to the Y axis and in which the Y value increases) on the touch panel. Based on the origin O (ox, oy) and the point T1 (t1 x, t1 y), a vector value V1 oriented vertically in front of the origin can be obtained.

On the other hand, in FIG. 13B, in a case where the stick input on the right side of the origin is performed on the touch panel, the player must press a point T2 (t2 x, t2 y) which is to the right of the origin O (ox, oy) (which is the direction which is parallel to the X axis and in which the X value increases) on the touch panel. Based on the origin O (ox, oy) and the point T2 (t2 x, t2 y), a vector value V2 oriented to the right can be obtained. Accordingly, when the stick input vertically in front of the origin is shifted to the stick input on the right side of the origin on the touch panel, the player must press the touch panel aiming at the touch point which is in the right backward direction as seen from the point T1, as shown by the dotted lines in FIG. 13B. That is, in the case of the stick input on the right side of the origin being desired, the player attempts to move the pressing point in the rightward direction (the direction which is parallel to the X axis and in which the X value increases) of the point at which the player is currently pointing (it is also convenient for the player to do so), whereas when the point at which the player is currently pointing deviates vertically from the origin, it is not sufficient to move the pressing point in the rightward direction. For example, in a case where the point at which the player is currently pointing is in front of the origin, it is necessary to move the pressing point in the right backward direction in order to make the stick input on the right side of the origin, and thereby the difference between controllability of a joystick and controllability of a touch panel confuses the player operating the touch panel and it is necessary to constantly confirm the position of the origin.

Since a frame for guiding a lever is provided for the joystick in practice, for example, in a case where a rightward tilting force is applied to the lever being tilted in the maximum forward direction, the lever is naturally moved in the right backward direction along the guide, and the lever is eventually tilted in the maximum rightward direction. However, in a case where an operation in which a joystick is emulated using a touch panel is realized, since there is no guide as described above, the player must intentionally move the pressing point in the right backward direction. Further, in the case of an actual joystick, since the player can perceive how the lever is being tilted with his finger or hand, it is not necessary to visually confirm the origin of the joystick. However, in a case where an operation in which a joystick is emulated using a touch panel is realized, since it is impossible to perceive the origin with a finger, it is necessary to visually confirm the position of the origin.

Further, in FIG. 14A, in a case where a stick input on the right side of the origin is performed on a touch panel, the player presses a point T3 (t3 x, t3 y) which is to the right of an origin O (ox, oy) on the touch panel. Based on the origin O (ox, oy) and the point T3 (t3 x, t3 y), a vector value V3 oriented to the right is obtained.

In a case where the stick input on the right side of the origin, which is an input made by a player at the point T3 using the touch panel as described above, is shifted to a stick input on the left side of the origin, the player attempts to move the pressing point slightly in the leftward direction of the point T3 at which the player is pointing (the direction which is parallel to the X axis and in which the X value decreases). However, as shown in FIG. 14B, in a case where the player presses a point T4 (t4 x, t4 y) which is slightly to the left of the point T3, as long as the point T4 is to the right of the origin O, a vector value V4 oriented to the right is obtained.

Accordingly, in a case where the stick input on the right side of the origin, which is an input made by the player at the point T3 using the touch panel as described above, is shifted to the stick input on the left side of the origin, the player must move the pressing point in the leftward direction beyond the origin O from the point T3 at which the player is pointing. For example, as shown in FIG. 14C, in a case where the stick input on the left side of the origin is performed on the touch panel, the player must press a point T5 (t5 x, t5 y) which is to the left of the origin O (ox, oy) on the touch panel. Based on the origin O (ox, oy) and the point T5 (t5 x, t5 y), a vector value V5 oriented to the left can be obtained. Accordingly, when the stick input on the right side of the origin is shifted to the stick input on the left side of the origin on the touch panel, the player must press the touch panel aiming at the touch point which is to the left beyond the origin as seen from the point T3, as shown by the dotted lines in FIG. 14C. That is, the pressing point must be moved over a long distance, and it is necessary to perform an operation with confirming the position of the origin.

Since a frame for guiding a lever is provided for a joystick in practice, for example, the lever being tilted in the maximum rightward direction cannot be further tilted in the rightward direction. However, in a case where an operation in which a joystick is emulated using a touch panel is realized, since there is no guide as described above, the pressing point can be moved unlimitedly in the rightward direction within the touch panel surface. Then, in a case where it is desired that the input on the right side of the origin is changed to the input on the left side of the origin, it is necessary to move the pressing point over a long distance (that is, a response to the operation is deteriorated.)

Specifically, a predetermined area on the touch panel (for example, a circular area having the origin O at the center thereof) is assigned to each stick coordinate value, and when the areas other than the predetermined area are touch-operated, it is determines that a maximum stick input quantity is inputted. Thereby, an operation which is closer to an operation of a joystick can be realized. In this case, however, in a case where when the area other than the predetermined area is touch-operated, it is desired that the stick input quantity is changed, it is necessary to move the pressing point into the predetermined area. Further, in a case where it is desired that the direction of the stick input is changed, it is necessary to move the pressing point over a long distance. Moreover, in the case of the actual joystick, since the player can perceive how the lever is being tilted with his finger or hand, it is not necessary to visually confirm the origin of the joystick. On the other hand, in a case where an operation in which a joystick is emulated using a touch panel is realized, since it is impossible to perceive the origin with his finger, it is necessary to visually confirm the position of the origin.

A method for relatively moving a cursor according to a movement trace of a player's finger is also disclosed in the Patent Document 1. Further, a method for moving an object which is selectively touched on a game screen according to a movement corresponding to a vector of a movement of a finger with which a player touches a touch panel is disclosed in the Patent Document 2. In these methods, however, since the input is not made until the players' finger moves, the input for which a joystick is emulated cannot be realized. This is because an actual joystick continuously supplies a constant output when a lever is held at a given position. More specifically, in a case where a game object is moved according to a movement corresponding to a vector of a movement of a finger which touches the touch panel in the method disclosed in the Patent Document 2, the finger must be continuously moved in order to move the game object.

SUMMARY

Therefore, a feature of the example embodiment presented herein is to provide a storage medium having stored thereon a game program for enabling an operation in which a joystick is emulated using a pointing device, preventing a confusion on the operation by matching player's controllability with that for a joystick and also improving response to the operation, a game apparatus, and an input device.

The example embodiment has the following features to attain the above. The reference numerals, step Nos. (a step is abbreviated as S and only the step Nos. are indicated), and the like in the parentheses indicate the correspondence with the embodiment described below in order to aid in understanding the present example embodiment and are not intended to limit, in any way, the scope of the present example embodiment.

A first aspect of the present example embodiment is directed to a storage medium having stored thereon a game program executed by a computer (21) in a game apparatus (1) which is operated using a pointing device (13). The pointing device outputs coordinate information (tx, ty) being based on a given coordinate system (touch panel coordinate system) and being designated according to an operation of a player. The game program causes the computer operable to execute a reference coordinate setting step (S42), a designated coordinate setting step (S43), a reference coordinate changing step (S44 to S46), and a game control step (S47). In the reference coordinate setting step, a position of reference coordinates (ox, oy) is set in the coordinate system. In the designated coordinate setting step, designated coordinates (ux, uy) in the coordinate system are set based on the coordinate information outputted form the pointing device. In the reference coordinate changing step, a position of the reference coordinates is changed so as to approach the designated coordinates (that is, so as to shorten a distance between the designated coordinates and the reference coordinates) (S46). In the game control step, the game is controlled based on at least one (sx, sy) of an input direction which is a direction from the reference coordinates to the designated coordinates and an input distance which is a distance between the reference coordinates and the designated coordinates. The pointing device is an input device for designating an input position or coordinates on the screen, such as a touch panel, a mouse, a track pad, and a track ball. The coordinate system used for each input device is a touch panel coordinate system or a screen coordinate system.

In a second aspect, in the reference coordinate changing step, the position of the reference coordinates is changed so as to approach the designated coordinates when a predetermined condition is satisfied (for example, when the designated coordinates are outside the limited range (Yes in S45) or when an angle between the reference coordinates and the designated point coordinates is different from an angle obtained at the previous input, or when an angle between the reference coordinates and the designated point coordinates is greater than a predetermined angle).

In a third aspect, the predetermined condition which is used in the reference coordinate changing step is a condition that the designated coordinates are outside a predetermined area (limited range) based on the reference coordinates (Yes in S45). The predetermined area may be a circular area or an area other than a circular area such as an oval area or a rectangular area.

In a fourth aspect, in the game control step, the game is controlled based on at least the input distance. When the designated coordinates are outside the predetermined area based on the reference coordinates, the input distance is set as a predetermined distance from the reference coordinates to the boundary of the predetermined area (S47). When the distance between the boundary of the predetermined area and the reference coordinates is not constant (in the case of an oval area or the like), the distance between the reference coordinates and an intersection of a line segment connecting the designated coordinates with the reference coordinates and the boundary of the predetermined area is set as the input distance. In a case where the predetermined area is a circular area, when the distance (L1) between the designated coordinates and the reference coordinates is larger than the predetermined distance (R), the predetermined distance is set as the input distance. Further, in the reference coordinate changing step, the position of the reference coordinates is changed so as to approach the designated coordinates when the designated coordinates are outside the predetermined area based on the reference coordinates.

In a fifth aspect, the predetermined area is formed as a circular area (of a radius R) having the reference coordinates at the center thereof.

In a sixth aspect, in the reference coordinate changing step, the position of the reference coordinates is changed so as to approach the designated coordinates such that the distance between the designated coordinates and the reference coordinates has a same value as the predetermined distance.

In a seventh aspect, in the reference coordinate changing step, the position of the reference coordinates is changed so as to approach the designated coordinates along a line segment (s2) connecting the designated coordinates with the reference coordinates. For example, a point (exclusive of the reference coordinates) on the line segment (s2) connecting the designated coordinates with the reference coordinates may be set as new reference coordinates. Further, in this case, the distance between the new reference coordinates and the designated coordinates may be set so as not to be larger than the predetermined distance (R).

In an eighth aspect, in the reference coordinate changing step, the position of the reference coordinates is changed so as to be in the area (β) which is surrounded by a first arc (ar1), a second arc (ar2), a line segment (s2), and a straight line (s1) (FIG. 11). The first arc is an arc of a circle having the designated coordinates (U6) at the center thereof and having a radius of the predetermined distance (R). The second arc is an arc of a circle having the designated coordinates at the center thereof and having a radius of a length (L1) between the designated coordinates and the reference coordinates (O5). The line segment connects the designated coordinates with the reference coordinates. The straight line passes through designated coordinates (U6) which is currently set and the designated coordinates (U5) having been previously set in the designated coordinate setting step.

In a ninth aspect, in the reference coordinate changing step, the position of the reference coordinates is changed so as to be on the first arc which is interposed between the line segment and the straight line as well as on a position other than that on the line segment.

In a tenth aspect, in the reference coordinate changing step, the position of the reference coordinates is changed so as to be at a position other than points on the line segment.

In an eleventh aspect, in the reference coordinate changing step, the position of the reference coordinates is changed such that the larger the movement distance between the designated coordinates being currently set and the designated coordinates having been previously set is, the closer to the straight line the reference coordinates are.

In a twelfth aspect, the computer is further operable to execute an adjacent area setting step (S62, tolerance range). In the adjacent area setting step, an adjacent area is set around the designated coordinates which are set based on the coordinate information outputted from the pointing device. In the designated coordinate setting step, when a position indicated by the coordinate information which is newly outputted from the pointing device is within the adjacent area, the designated coordinates are not changed, and when a position indicated by the coordinate information which is newly outputted is outside the adjacent area (Yes in S62), the designated coordinates are changed based on the position indicated by the coordinate information (S64).

In a thirteenth aspect, the computer is further operable to execute a positional relationship storage step. In the positional relationship storage step, when an output of the coordinate information from the pointing device is stopped, stored is a relative positional relationship between the designated coordinates and the reference coordinates which are set before the output is stopped. In the designated coordinate setting step, a position indicated by the earliest coordinate information which is outputted from the pointing device after the output is stopped is set as designated coordinates in the coordinate system. In the reference coordinate setting step, a position of the reference coordinates is set in the coordinate system based on the relative positional relationship having been stored in the positional relationship storage step using as a reference a position indicated by the earliest coordinate information.

In a fourteenth aspect, in the game control step, when the output of the coordinate information from the pointing device is stopped, the game is continuously controlled based on at least one of the input direction and the input distance obtained according to the designated coordinates and the reference coordinates, which are set before the output is stopped.

In a fifteenth aspect, the game apparatus comprises a display (12) which is covered by the pointing device. The computer is further operable to execute a reference coordinate position display step. In the reference coordinate position display step, an image indicating the position of the reference coordinates is displayed on the display.

A sixteenth aspect of the present example embodiment is directed to a game apparatus which is operated using a pointing device. The pointing device outputs coordinate information being based on a given coordinate system and being designated according to an operation of a player. The game apparatus comprises a reference coordinate setting means, a designated coordinate setting means, a reference coordinate changing means, and a game control means. The reference coordinate setting means sets a position of reference coordinates in the coordinate system. The designated coordinate setting means sets designated coordinates in the coordinate system based on the coordinate information which is outputted from the pointing device. The reference coordinate changing means changes a position of the reference coordinates so as to approach the designated coordinates. The game control means controls the game based on at least one of an input direction which is a direction from the reference coordinates to the designated coordinates and an input distance which is a distance between the reference coordinates and the designated coordinates.

A seventeenth aspect of the present example embodiment is directed to an input device for inputting information to the game apparatus according to an operation of a player. The input device comprises a coordinate information output means (13), a reference coordinate setting means, a designated coordinate setting means, and a reference coordinate changing means. The coordinate information output means outputs coordinate information being based on a given coordinate system and being designated according to the operation of the player. The reference coordinate setting means sets a position of reference coordinates in the coordinate system. The designated coordinate setting means sets designated coordinates in the coordinate system based on the coordinate information which is outputted from the coordinate information output means. The reference coordinate changing means changes a position of the reference coordinates so as to approach the designated coordinates. The game apparatus controls the game based on at least one of an input direction which is a direction from the reference coordinates to the designated coordinates and an input distance which is a distance between the reference coordinates and the designated coordinates.

An eighteenth aspect of the present example embodiment is directed to a storage medium having stored thereon a program executed by a computer in an information processing apparatus (1) which is operated using a pointing device. The pointing device outputs coordinate information being based on a given coordinate system and being designated according to an operation of a user. The program causes the computer operable to execute a reference coordinate setting step, a designated coordinate setting step, a reference coordinate changing step, and an operation processing step. In the reference coordinate setting step, a position of reference coordinates in the coordinate system is set. In the designated coordinate setting step, designated coordinates in the coordinate system is set based on the coordinate information which is outputted from the pointing device. In the reference coordinate changing step, a position of the reference coordinates is changed so as to approach the designated coordinates. In the operation processing step, an operation is processed based on at least one of an input direction which is a direction from the reference coordinates to the designated coordinates and an input distance which is a distance between the reference coordinates and the designated coordinates.

According to the first or the second aspect, reference coordinates are made to approach designated coordinates, and thereby at least one of an input direction and an input distance for controlling the game can be changed without delay. As to the input direction, the larger the distance between the reference coordinates and the designated coordinates is, the less the input direction changes even when the designated coordinates are moved the same distance. According to the first aspect, however, the reference coordinates are made to approach the designated coordinates, thereby enabling the response of the change of the input direction to be improved. As to the input distance, the larger the distance between the reference coordinates and the designated coordinates is, the larger the movement distance of the designated coordinates for zeroing or halving the input quantity of the input distance becomes. According to the first aspect, however, the reference coordinates are made to approach the designated coordinates, thereby enabling the response of the change of the input quantity of the input distance to be improved.

According to the third aspect, the reference coordinates are prevented from being too far apart from the designated coordinates, and thereby at least one of the input direction and the input distance for controlling the game can be changed without delay.

According to the fourth aspect, when the designated coordinates are outside a predetermined area based on the reference coordinates, the input distance is set as a predetermined distance from the reference coordinates to a boundary of the predetermined area, and thereby an operation which is closer to a joystick operation can be realized. When the designated coordinates are outside the predetermined area based on the reference coordinates, the position of the reference coordinates is changed so as to approach the designated coordinates, and thereby the input quantity of the input distance or the input direction can be changed without the pressing point being moved over a long distance.

According to the fifth aspect, the predetermined area is circular, and thereby an operation which is much closer to an joystick operation can be realized.

According to the sixth aspect, the designated coordinates can be always within the predetermined area, and thereby an operation in which a joystick is emulated can be realized with higher response to operation. Further, the reference coordinates are always set within a given range with respect to the designated coordinates, and thereby a player can feel and know the approximate position of the reference coordinates which is set by the pointing device, and can operate the pointing device feeling as if he operates a joystick.

According to the seventh aspect, the position of the reference coordinates is changed so as to approach the designated coordinates along the line segment connecting the designated coordinates with the reference coordinates, and thereby the direction of the line segment connecting the designated coordinates with the reference coordinates is not changed. That is, since the input direction is not changed, the input direction can be matched with the direction in which the player intends to make an input.

According to the eighth aspect, the response to the operation can be improved in accordance with the player's controllability.

According to the ninth aspect, since the distance between the reference coordinates and the designated coordinates is not made larger than a predetermined distance, the response to the operation can be reliably prevented from being deteriorated beyond a certain degree.

According to the tenth aspect, the input direction is corrected so as to approach the moving direction of the designated coordinates, and thereby the input direction can be determined in consideration of the moving direction of the designated coordinates.

According to the eleventh aspect, the larger the movement distance of the designated coordinates is, the more the moving direction of the designated coordinates can be matched with the direction of the stick input.

According to the twelfth aspect, in a case where coordinate information designated by the pointing device cannot be determined as one point and is slightly moving due to the player slightly moving the pressing point unintentionally or due to a cause concerning precision of a hardware for the pointing device or other causes, the variation within the adjacent area is neglected, that is, an tolerance can be set.

According to the thirteenth aspect, since the relative positional relationship between the reference coordinates and the designated coordinates are maintained, even when the operation is interrupted against the player's intention, the player can continue the game feeling as if no interruption occurred.

According to the fourteenth aspect, it becomes unnecessary for the player to continue the same operation for a long time, and thereby the same operation can be easily continued.

According to the fifteenth aspect, an image indicating a position of the reference coordinates is displayed on the display device, and thereby the reference position can be further indicated to the player in real time.

Further, the game apparatus, the input device and the storage medium having a program stored thereon according to the present example embodiment enables the same effect as that obtained by the aforementioned game program to be achieved.

These and other features, aspects and advantages of the present example embodiment will become more apparent from the following detailed description of the present example embodiment when taken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an outline view illustrating a game apparatus 1 executing a game program according to one embodiment;

FIG. 2 is a block diagram illustrating an internal structure of the game apparatus 1 shown in FIG. 1;

FIG. 3 is a flow chart illustrating an operation performed by the game apparatus 1 by executing the game program according to one embodiment;

FIG. 4 shows a subroutine which is a detailed operation of initialization at the start of touch in step 42 shown in FIG. 3;

FIG. 5 shows a subroutine which is a detailed operation of hand jiggling correction for the touch point in step 43 shown in FIG. 3;

FIG. 6 shows a subroutine which is a detailed operation of an origin being drawn in step 46 shown in FIG. 3;

FIGS. 7A and 7B are diagrams illustrating an example of the hand jiggling correction, which is carried out according to the operation based on the flow chart shown in FIG. 3;

FIG. 8 is a diagram illustrating an example of a designated point, an origin, and a limited range which are processed according to the operation based on the flow chart shown in FIG. 3;

FIGS. 9A and 9B are diagrams illustrating an example of an operation of an origin being drawn, which is carried out according to the operation based on the flow chart shown in FIG. 3;

FIGS. 10A to 10D are diagrams illustrating an example where the vector value from the origin to the designated point is changed by repeating the origin drawing on the basis of the flow chart shown in FIG. 3;

FIG. 11 is a diagram illustrating an example for explaining a position to which the origin is drawn according to parameters m and n;

FIG. 12 is a diagram illustrating another example for explaining a position to which the origin is drawn according to the parameters m and n;

FIGS. 13A and 13B show an example of a prior art operation performed by a player so as to shift from an input vertically in front of an origin to an input on the right side of the origin using a touch panel; and

FIGS. 14A to 14C show an example of a prior art operation performed by the player so as to shift from the input on the right side of the origin to an input on the left side of the origin using the touch panel.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

A game apparatus which executes a game program according to one embodiment will be described with reference to the drawings. FIG. 1 is an outline view illustrating a game apparatus 1 which executes a game program according to the present invention. Here, a portable game apparatus is shown as an example of the game apparatus 1.

In FIG. 1, the game apparatus 1 according to this embodiment is accommodated in a housing 18 so that two liquid crystal display devices (hereinafter, referred to as “LCDs”) 11 and 12 are placed in predetermined positions. Specifically, in a case where the first LCD 11 and the second LCD 12 are to be positioned one on top of the other, the housing 18 is composed of a lower housing 18 a and an upper housing 18 b, the upper housing 18 b being pivotably supported by a portion of the upper side of the lower housing 18 a. The upper housing 18 b has a planar contour which is slightly larger than that of the first LCD 11. The upper housing 18 b has an opening in one principal face thereof, through which a display screen of the first LCD 11 is exposed. The lower housing 18 a has a more elongated planar contour than that of the upper housing 18 b (i.e., so as to have a longer lateral dimension). An opening for exposing the display screen of the second LCD 12 is formed in a portion of the lower housing 18 a which lies substantially in the center of the lower housing 18 a along the lateral direction. A sound hole for the loudspeaker 15 is formed in either (right or left) wings of the lower housing 18 a between which the second LCD 12 is interposed. An operation switch section 14 is provided on the right and left wings of the lower housing 18 a between which the second LCD 12 is interposed.

The operation switch section 14 includes: an operation switch (“A” button) 14 a and an operation switch (“B” button) 14 b, which are provided on a principal face of the right wing of the lower housing 18 a (lying to the right of the second LCD 12); a direction switch (cross key) 14 c, a start switch 14 d, and a select switch 14 e, which are provided on a principal face of the left wing of the lower housing 18 a (lying to the left of the second LCD 12); and side switches 14 f and 14 g. The operation switches 14 a and 14 b are used for giving instructions such as: “pass” “shoot”, etc., in the case of a sports game such as a soccer game; “jump”, “punch”, “use a weapon”, etc., in the case of an action game; or “get an item”, “select a weapon”, “select a command”, etc., in the case of a role playing game (RPG) or a simulation RPG. The direction switch 14 c is used by a player for providing instructions concerning directions on the game screen, e.g., instructions of moving directions of (i.e., a direction in which to move) a player object (or a player character) that can be controlled by using the operation switch section 14, or instructions of a moving direction for a cursor, for example. The side switch (“L” button) 14 f and the side switch (“R” button) 14 g are provided at the left and right ends of an upper face (upper side face) of the lower housing 18 a. As necessary, more operation switches may be added.

Further, a touch panel 13 (an area marked by dotted lines in FIG. 1) is mounted on the upper principal face of the second LCD 12 as an example of the input device of the present invention. The touch panel 13 may be of any one of, for example, a resistive film type, an optical type (infrared type), or a capacitive coupling type. The touch panel 13 is a pointing device which, when a stylus 16 (or a finger) is pressed against or moved or dragged on the upper principal face of the touch panel 13, detects the coordinate position of the stylus 16 and outputs coordinate data.

As necessary, a hole (an area marked by double-dot lines in FIG. 1) for accommodating the stylus 16 with which to manipulate the touch panel 13 is provided near a side face of the upper housing 18 b. The hole can hold the stylus 16. In a portion of a side face of the lower housing 18 a is provided a cartridge receptacle (an area marked by dash-dot lines in FIG. 1), into which a game cartridge 17 (hereinafter simply referred to as “the cartridge 17”) internalizing a memory having a game program stored therein (e.g., a ROM) is detachably inserted. The cartridge 17 is an information storage medium for storing a game program, e.g., a non-volatile semiconductor memory such as a ROM or a flash memory. A connector (see FIG. 2) lies inside the cartridge receptacle for providing electrical connection with the cartridge 17. Furthermore, the lower housing 18 a (or alternatively the upper housing 18 b) accommodates an electronic circuit board on which various electronic components such as a CPU are mounted. Examples of the information storage medium for storing a game program are not limited to the aforementioned non-volatile semiconductor memory, but may also be a CD-ROM, a DVD, or any other optical disk type storage medium.

Next, referring to FIG. 2, the internal structure of the game apparatus 1 will be described. FIG. 2 is a block diagram illustrating an internal structure of the game apparatus 1 of FIG. 1.

In FIG. 2, a CPU core 21 is mounted on the electronic circuit board accommodated in the housing 18. Via a predetermined bus, the CPU core 21 is connected to a connector 28 for enabling connection with the cartridge 17, an input/output interface (I/F) circuit 27, a first graphics processing unit (first GPU) 24, a second graphics processing unit (second GPU) 26, and a working RAM (WRAM) 22.

The cartridge 17 is detachably connected to the connector 28. As described above, the cartridge 17 is a storage medium for storing a game program. Specifically, the cartridge 17 includes a ROM 171 for storing a game program and a RAM 172 for storing backup data in a rewritable manner. A game program which is stored in the ROM 171 of the cartridge 17 is loaded to a WRAM 22, and the game program having been loaded to the WRAM 22 is executed by the CPU core 21. Temporary data which is obtained by the CPU core 21 executing the game program and data from which to generate images are stored in the WRAM 22.

Thus, the ROM 171 has stored thereon a game program which comprises instructions and data which are of a format executable by a computer in the game apparatus 1, in particular by the CPU core 21. The game program is loaded to the WRAM 22 as appropriate, and executed. Although the present embodiment illustrates an example where the game program and the like are stored on the cartridge 17, the game program and the like may be supplied via any other medium or via a communications circuit.

The touch panel 13, the operation switch section 14, and the loudspeaker 15 are connected to the I/F circuit 27. The loudspeaker 15 is placed inside the aforementioned sound hole.

The first GPU 24 is connected to a first video-RAM (hereinafter “VRAM”) 23. The second GPU 26 is connected to a second video-RAM (hereinafter “VRAM”) 25. In accordance with an instruction from the CPU core 21, the first GPU 24 generates a first game image on the basis of the data used for generation of image which is stored in the WRAM 22, and writes images into the first VRAM 23. In accordance with an instruction from the CPU core 21, the second GPU 26 generates a second game image on the basis of the data used for generation of image which is stored in the WRAM 22, and writes images into the second VRAM 25.

The first GPU 24 is connected to the first LCD 11, and the second GPU 26 is connected to the second LCD 12. The first GPU 24 outputs to the first LCD 11 the first game image which has been written into the first VRAM 23 in accordance with an instruction from the CPU core 21, and the first LCD 11 displays the first game image having been output from the first GPU 24. The second GPU 26 outputs to the second LCD 12 the second game image which has been written into the second VRAM 25 in accordance with an instruction from the CPU core 21, and the second LCD 12 displays the second game image having been output from the second GPU 26.

The I/F circuit 27 is a circuit which governs exchanges of data between the CPU core 21 and the external input/output devices such as the touch panel 13, the operation switch section 14, and the loudspeaker 15. The touch panel 13 (including a device driver for the touch panel) has a touch panel coordinate system corresponding to the coordinate system of the second VRAM 25, and outputs data of position coordinates corresponding to a position which is input (designated) by means of the stylus 16 or the like. For example, the display screen of the second LCD 12 has a resolution of 256 dots×192 dots, and the touch panel 13 also has a detection accuracy of 256 dots×192 dots so as to correspond to the display screen. The detection accuracy of the touch panel 13 may be lower or higher than the resolution of the display screen of the second LCD 12.

Next, processing which is executed by the game apparatus 1 according to the game program on the basis of information inputted from the touch panel 13 according to the present invention will be described with reference to FIGS. 3 to 11. FIG. 3 is a flow chart illustrating an operation which is carried out by the game apparatus 1 by executing the game program. FIG. 4 shows a subroutine illustrating an operation of initialization at the start of touch in step 42 of FIG. 3 in detail. FIG. 5 shows a subroutine illustrating an operation of hand jiggling correction for a touch point in step 43 of FIG. 3 in detail. FIG. 6 shows a subroutine illustrating an operation of an origin being drawn in step 46 of FIG. 3 in detail. FIGS. 7A to 11 are diagrams illustrating examples of touch-operations which are processed through the operation based on the flow chart shown in FIG. 3. The program for executing these processing is contained in the game program stored in the ROM 171. When the game apparatus 1 is powered on, the program is loaded to the WRAM 22 from the ROM 171, and executed by the CPU core 21.

Initially, when the power source (not shown) of the game apparatus 1 is turned on, the CPU core 21 executes a boot program (not shown), and thereby the game program stored in the cartridge 17 is loaded to the WRAM 22. The game program having been loaded is executed by the CPU core 21, thereby to execute steps (abbreviated as “S” in FIGS. 3 to 6) shown in FIG. 3. The game program is executed, and thereby game images and the like in accordance with the game program are written into the first LCD 11 and the second LCD 12. The detailed description is not given of the contents of the game. Here, the processing based on the information inputted from the touch panel 13 will be described in detail.

In FIG. 3, the CPU core 21 determines whether a player is touching the touch panel 13 or not in step 40. The touch panel 13 has a touch panel coordinate system as described above, and outputs data of position coordinates corresponding to a position which is inputted (designated) by means of the stylus 16 or a finger of the player. That is, in step 40, the CPU core 21 detects whether the data of the position coordinates outputted by the touch panel 13 (including a device driver controlling the touch panel 13) is present or not. When the player is not touching the touch panel 13, the CPU core 21 sets a touch flag as OFF in step 48, sets a stick value as neutral in step 49, and ends the processing according to the flow chart. On the other hand, when the player is touching the touch panel 13, the CPU core 21 advances the processing to the next step 41.

In step 41, the CPU core 21 determines whether or not the player touch-operates the touch panel 13 as a start of touch (that is, determines whether a non-touch state changes to a touch state or not.) The CPU core 21 can determine whether the touch-operation is a start of touch or not based on whether the touch flag is being set as ON or OFF, which will be described later. When the touch-operation is a start of touch (that is, when the touch flag is being set as OFF), the CPU core 21 advances the processing to the next step 42. On the other hand, when the touch-operation is not a start of touch (that is, when the touch-operation is continued; the touch flag is being set as ON), the CPU core 21 advances the processing to the next step 43.

In step 42, the CPU core 21 carries out initialization at the start of touch. Hereinafter, the initialization at the start of touch will be described with reference to a subroutine shown in FIG. 4.

In FIG. 4, the CPU core 21 sets the touch flag as ON in step 51. The CPU core 21 sets, to an origin on the touch panel 13 (hereinafter, simply referred to as an origin), a touch point at which the player is currently touch-operating the touch panel 13 (hereinafter, simply referred to as a touch point) in step 52. Specifically, when the touch point is (tx, ty) and the origin is (ox, oy) in the touch panel coordinate system, the CPU core 21 sets, as the origin coordinates, ox=tx oy=ty.

Next, the CPU core 21 sets the touch point as a designated point on the touch panel 13 (hereinafter, simply referred to as a designated point) in step 53, and ends the processing according to the subroutine. Specifically, when the touch point is (tx, ty) and the designated point is (ux, uy) in the touch panel coordinate system, the CPU core 21 sets, as the designated point coordinates, ux=tx uy=ty.

Returning to FIG. 3, in step 43, the CPU core 21 makes hand jiggling correction for a touch point. Hereinafter, the hand jiggling correction for the touch point will be described with reference to the subroutine shown in FIG. 5. For example, when a player touch-operates the touch panel 13 with his finger or the like which has a wide area, the touch panel 13 cannot determine the touch point as one point and the touch point coordinates sometimes jiggle. Therefore, in the hand jiggling correction for the touch point, the designated point coordinates for use in the processing are defined differently from the touch point coordinates to produce an tolerance for the touch point coordinates. That is, while the touch point coordinates are jiggling with respect to the designated point coordinates within a predetermined range, the designated point coordinates remains unchanged. For example, a circular frame (tolerance range) having the designated point coordinates at the center thereof is set, thereby setting the center of the circular frame as the designated point coordinates. While the touch point coordinates are present within the circular frame, the circular frame is not moved. On the other hand, when the touch point coordinates deviate beyond the circular frame, the circular frame is moved in accordance with the movement of the touch point, thereby resulting in the designated point coordinates being moved. That is, the designated point coordinates are moved in accordance with the movement of the circular frame, the movement being caused when the touch point contacts the outer edge of the circular frame. The radius of the circular frame corresponds to the tolerance range for the hand jiggling on the touch panel 13. The tolerance range is not necessarily required to be a circular area, and the designated point coordinates are not necessarily required to be the center of the area.

In FIG. 5, the CPU core 21 obtains a distance L2 between the touch point and the designated point which is currently being set based on the difference therebetween in step 61. Specifically, when the touch point is (tx, ty) and the designated point is (ux, uy) in the touch panel coordinate system, the CPU core 21 obtains the differences vx and vy as follows. vx=ux−tx vy=uy−ty The CPU core 21 obtains the distance L2 as follows. L2=√{square root over (vx ² +vy ²)} Thereby, the distance L2 between the designated point and the touch point are obtained on the basis of the touch panel coordinate system.

Next, the CPU core 21 determines whether or not the touch point deviates beyond the tolerance range which is set around the designated point in step 62. As shown in FIG. 7A, a predetermined area having the designated point (ux, uy) at the center thereof is set as the tolerance range. For example, the tolerance range is set as a circular area of a predetermined radius having the designated point (ux, uy) at the center thereof. The CPU core 21 compares the distance L2 obtained in the step 61 with the radius of the tolerance range, and when the distance L2 is larger, the CPU core 21 determines that the touch point deviates beyond the tolerance range. When the touch point deviates beyond the tolerance range (the state shown in FIG. 7A), the CPU core 21 advances the processing to the next step 63. On the other hand, when the touch point is within the tolerance range, the CPU core 21 ends the processing according to the subroutine.

In step 63, the CPU core 21 stores the coordinates of the current designated point so as to obtain the movement speed of the designated point, which will be described later. Specifically, as shown in FIG. 7B, when the designated point coordinates to be stored are (uxa, uya) in the touch panel coordinate system, the CPU core 21 sets as uxa=ux uya=uy.

Next, the CPU core 21 moves the designated point such that the touch point is positioned on the outer edge of the tolerance range in step 64. For example, as shown in FIG. 7B, the CPU core 21 moves the designated point along a straight line connecting the designated point with the touch point such that the distance between the designated point and the touch point is the distance r, thereby to set a new designated point. Specifically, when the new designated point is (ux, uy) in the touch panel coordinate system, the CPU core 21 sets as ux=tx+vx*r/L2 uy=ty+vy*r/L2 where r is a radius of the tolerance range.

Next, the CPU core 21 calculates the moving distance of the designated point in step 65, and ends the processing according to the subroutine. Specifically, the CPU core 21 calculates the moving distance of the designated point using the following formula. uvx=ux−uxa uvy=uy−uya

The motion vector (uvx, uvy) is used for adjusting a direction in which an origin is drawn, which will be described below in detail.

Returning to FIG. 3, the CPU core 21 obtains a distance L1 between the origin being currently set and the designated point based on the difference therebetween in step 44. Specifically, when the origin is (ox, oy) and the designated point is (ux, uy) in the touch panel coordinate system, the CPU core 21 obtains the differences vx and vy as follows: vx=ox−ux vy=oy−uy The CPU core 21 obtains the distance L1 as follows. L1=√{square root over (vx ² +vy ²)} Thereby, the distance L1 between the origin and the designated point are obtained on the basis of the touch panel coordinate system.

Next, the CPU core 21 determines whether or not the designated point deviates beyond the limited range being set around the origin in step 45. As shown in FIG. 8, a predetermined area having the origin (ox, oy) at the center thereof is set as the limited range. For example, the limited range is set as a circular area of a predetermined radius having the origin (ox, oy) at the center thereof. The CPU core 21 compares the distance L1 obtained in the step 44 with a radius R of the limited range, and when the distance L1 is larger, the CPU core 21 determines that the designated point deviates beyond the limited range. When the designated point deviates beyond the limited range, the CPU core 21 advances the processing to the next step 46. On the other hand, when the designated point is within the limited range (the state shown in FIG. 8), the CPU core 21 advances the processing to the next step 47.

Prior to step 46 being described, the processing of step 47 performed in the case of the designated point being within the limited range set around the origin (No in step 45) will be described. In step 47, the CPU core 21 obtains a stick value based on a vector value from the origin to the designated point.

According to the present embodiment, an operation in which the touch panel 13 is used to emulate a joystick is realized and the required information is a vector value of 2 axes of X and Y corresponding to an input value of a joystick (hereinafter, referred to as a stick value). The vector value is represented as a stick value (sx, sy) in the stick coordinate system. The direction indicated by the stick value (sx, sy) indicates a direction in which the joystick is tilted and the length of the stick value indicates a degree to which the joystick is tilted. Further, the length of the stick value corresponding to the joystick being tilted to the maximum is set as “1”. In this case, sx=−1 to +1 and sy=−1 to +1. The length of “0” indicates that the joystick is in a neutral (upright) position.

In step 47, the stick value (sx, sy) in the stick coordinate system can be obtained according to the following formula, using the origin (ox, oy) and the designated point (ux, uy) on the touch panel 13, the origin and the designated point being represented in the touch panel coordinate system. sx=(ux−ox)×ratio sy=(uy−oy)×ratio where the ratio is a conversion ratio used for defining a length in the touch panel coordinate system, which corresponds to the length “1” in the stick coordinate system. The vector value from the origin to the designated point is represented as a vector (ux−ox, uy−oy).

According to the present embodiment, a limited range corresponding to a frame for mechanically controlling a degree to which a joystick lever is tilted is provided around the origin, and an operation of the outer edge of the limited range being touch-operated is handled as an operation of the joystick being tilted to the maximum. A touch-operation performed outside the limited range is similarly handled as an operation of the outer edge of the limited range being touch-operated. That is, the length between the origin and the outer edge of the limited range provided around the origin is defined as the length “1” in the stick coordinate system. Accordingly, ratio=1/R is set. Here, R is a radius of the limited range in the touch panel coordinate system.

As shown in FIG. 8, the player touch-operates the touch panel 13 at a position vertically in front of the origin (ox, oy) in the limited range, thereby setting a designated point (ux1, uy1). In this case, the vector value from the origin to the designated point is a vector v1 (ux1−ox, uy1−oy) which is oriented vertically in front of the origin. The stick value obtained on the basis of the vector v1 has the direction to vertically in front of the origin and the length smaller than or equal to “1”.

Then, the player touch-operates the touch panel 13 at a position to the right of the designated point (ux1, uy1) in the limited range, thereby setting a designated point (ux2, uy2). In this case, the vector value from the origin to the designated point is a vector v2 (ux2−ox, uy2−oy) which is oriented to the right forward direction. The stick value obtained on the basis of the vector v2 has the right forward direction and the length smaller than or equal to “1”.

Returning to FIG. 3, when the designated point deviates beyond the limited range provided around the origin (Yes in step 45), the CPU core 21 performs an operation of the origin being drawn in step 46. Hereinafter, an operation of the origin being drawn will be described with reference to the subroutine shown in FIG. 6.

In FIG. 6, the CPU core 21 sets a direction in which the origin is drawn in step 71. For example, the CPU core 21 sets a direction in which the origin is drawn to a drawing direction (px, py) in the touch panel coordinate system. The CPU core 21 obtains the drawing direction (px, py) as follows. px=ox−(ux+uvx*m) py=oy−(uy+uvy*m) where m is a parameter greater than or equal to 0, for adjusting a direction in which the origin is drawn, and the greater the value is, the closer is the direction in which the origin is drawn to the moving direction of the designated point, that is, the closer is the origin to the backward position of the designated point (assuming that the moving direction of the designated point is forward). That is, in the case of m=0, the origin is drawn so as not to change the direction of the vector connecting the origin with the designated point. The origin is drawn such that the greater m is, the closer is the direction of the vector oriented from the origin to the designated point to the direction of the motion vector of the designated point. According to the adjustment of the value of m, the vector direction of the stick value is determined by focusing on the positional relationship between the designated point and the origin (when m is small), or the vector direction of the stick value is determined by focusing on the moving direction of the designated point (when m is large). Although the expression of “drawing direction” is used, it should be noted that the “drawing direction” is calculated as a reverse direction of the direction in which the origin is actually drawn. The origin drawing direction obtained using the parameter m will be described below in detail.

For example, as shown in FIG. 9A, the player touch-operates the touch panel 13 at a position vertically in front of the origin (ox, oy) in the limited range, thereby setting a designated point (ux1, uy1). In this case, since the designated point (ux1, uy1) is within the limited range, the operation of the origin being drawn is not executed. Then, the player touch-operates the touch panel 13 at a position which is to the right of the designated point (ux1, uy1) outside the limited range, thereby setting a designated point (ux3, uy3). In the step 71, in the case of m=0, the direction in which the origin (ox, oy) is connected with the designated point (ux3, uy3) is set as a direction (px, py) in which the origin is drawn.

Next, the CPU core 21 calculates origin destination target coordinates in step 72. Specifically, the CPU core 21 initially calculates a length L3 based on the drawing direction (px, py) which is set in step 71 as follows. L3=√{square root over (px ² +py ²)} The CPU core 21 calculates the origin destination target coordinates (ox2, oy2) based on the touch panel coordinate system as follows. ox2=ux+px*R/L3 oy2=uy+py*R/L3

Next, the CPU core 21 moves the origin in step 73, and ends the processing according to the subroutine. While the origin may be moved to the destination target coordinates which are determined as described above, the origin can be moved so as to gradually approach the destination target coordinates. Specifically, the CPU core 21 calculates the moved origin coordinates (ox, oy) as follows. ox=ox+(ox2−oy)*n oy=oy+(oy2−oy)*n where n is a parameter indicating a rate at which the origin is moved so as to approach the destination target coordinates. The setting value of the parameter n can be adjusted so as to control a rate (parameter n) at which the pre-moved origin is added to a difference between the pre-moved origin and the destination target coordinates (ox2, oy2) calculated in step 72.

For example, FIG. 9B shows an example where the origin (ox, oy) is drawn to the designated point (ux3, uy3) in the case of the parameters m and n being set as m=0 and n=1, respectively. As shown in FIG. 9B, in a case where the designated point (ux3, uy3) is set outside the limited range (an area marked by the dotted lines in FIG. 9B), the origin (ox, oy) is drawn to the designated point (ux3, uy3) and the limited range is also drawn to the designated point (ux3, uy3). In the case of m=0, the direction in which the origin (ox, oy) is drawn is a direction in which the pre-moved origin moves to the designated point (ux3, uy3). In the case of n=1, the origin (ox, oy) is moved and thereby the designated point (ux3, uy3) is positioned at the outer edge of the limited range set around the origin, and the distance L1 between the origin having been moved and the designated point=the radius R of the limited range. As described above, when the designated point is outside the limited range, in the origin drawing operation, the origin is changed so as to approach the designated point.

Next, the processing of step 47 performed after the origin is drawn will be described. As described above, the CPU core 21 obtains a stick value based on a vector value from the origin to the designated point, and in step 47 the vector value is calculated using the origin having been drawn. Hereinafter, an example where the vector value is changed according to origins having been drawn will be described with reference to FIGS. 10A to 10D. FIGS. 10A to 10D are diagrams illustrating an example where the origin is repeatedly drawn, thereby changing the vector value from the origin to the designated point, and the parameters m and n are set as m=0 and n=1, respectively, for giving a concrete description.

In FIG. 10A, the player touch-operates the touch panel 13 at a position vertically in front of the origin O1 in the limited range A1, thereby setting a designated point U1. In this case, the vector value from the origin O1 to the designated point U1 is a vector V1 oriented vertically in front of the origin. The stick value which is obtained on the basis of the vector V1 also has a direction to vertically in front of the origin and has the length smaller than or equal to “1”.

Then, the designated point is moved in the rightward direction. In FIG. 10B, the player touch-operates the touch panel 13 at the outer edge of the limited range A1 which is to the right of the designated point U1, thereby setting a designated point U2. In this case, the vector value from the origin O1 to the designated point U2 is a vector V2 indicating the right forward direction which forms an angle of θ2 with the horizontal direction. The stick value which is obtained on the basis of the vector V2 similarly has the right forward direction and the length of “1”.

Further, the designated point is moved in the rightward direction. In FIG. 10C, the player touch-operates the touch panel 13 at a position which is to the right of the designated points U1 and U2 and which is outside the limited range A1 (an area marked by dotted lines in FIG. 10C), thereby setting a designated point U3. In the case of m=0, the origin (an outline round mark shown in FIG. 10C) is drawn in the direction of the designated point U3, and thereby the origin O2 is set so as to position the designated point U3 at the outer edge of the limited range A2. In this case, the vector value from the origin O2 to the designated point U3 is a vector V3 indicating the right forward direction which forms an angle of θ3 (θ3<θ2) with the horizontal direction. The stick value which is obtained on the basis of the vector V3 similarly has the right forward direction and the length of “1”.

Moreover, in FIG. 10D, the player touch-operates the touch panel 13 at a position which is to the right of the designated points U1, U2 and U3 and which is outside the limited range A2 (an area marked by dotted lines in FIG. 10D), thereby setting a designated point U4. In the case of m=0, the origin (an outline round mark shown in FIG. 10D) is drawn in the direction of the designated point U4, and thereby the origin O3 is set so as to position the designated point U4 at the outer edge of the limited range A3. In this case, the vector value from the origin O3 to the designated point U4 is a vector V4 indicating the right forward direction which forms an angle of θ4 (θ4<θ3) with the horizontal direction. The stick value which is obtained on the basis of the vector V4 similarly has the right forward direction and the length of “1”.

As described above, the setting value of the parameter n is adjusted so as to control a rate at which the origin is moved so as to approach the destination target coordinates (that is, a rate at which a length indicated by a stick value is changed so as to approach a predetermined distance R when the length indicated by the stick value is larger than the predetermined distance R). Therefore, the distance between the origin and the designated point may be sometimes larger than R depending on a value of the parameter n. In this case, as to the stick value (sx, sy) obtained in the step 47, the absolute values of sx and sy are greater than 1, resulting in the length of the stick value being set as a value greater than 1. However, as described above, the length of the stick value indicates a degree to which a joystick is tilted and the length of the stick value corresponding to the joystick being tilted to the maximum is set as “1”. Therefore, when the length of the stick value is greater than 1, the length of the stick value is set as “1”.

As described above, in the origin drawing operation, when the designated point is continuously moved in a give direction (a direction in which the player moves the touch point; the right horizontal direction in FIGS. 10A to 10D), the direction indicated by the stick value (that is, the direction in which a joystick is tilted) gradually approaches the moving direction of the designated point (the right horizontal direction). Therefore, the player continuously moves the designated coordinates in a given direction, thereby determining a direction in which a stick is inputted without concern for the position of the origin.

Also when the origin is fixed as in the prior art, a direction indicated by a stick value approaches the right horizontal direction in which the touch-operation is carried out. However, the angle θ4 and the like are smaller when the origin is fixed. It is clear that the direction indicated by the stick value further approaches the direction in which the touch-operation is carried out when the origin is drawn. Further, the designated point is always set within the limited range, and the distance between the designated point and the origin is always within a predetermined distance. Therefore, even when the player moves the designated point (touch point) to a position which is extremely far away from the origin and carries out an operation for tilting a joystick to the maximum and returning the joystick in the reverse direction, the distance to the origin of the touch panel is within the predetermined distance, thereby improving a response to the operation. Further, the origin is always set within a given range with respect to the touch point on the touch panel 13, and thereby the player can feel and know the position of the origin being set on the touch panel 13, and the player can control the touch panel 13 without visually checking the touch panel 13 feeling as if the player controls a joystick.

As described above, the setting value of the parameter m can be adjusted so as to control a rate at which the destination target coordinates are moved so as to approach the backward position of the designated point (assuming that the moving direction of the designated point is forward) (that is, a rate at which a direction indicated by a stick value is moved so as to approach the moving direction of the designated point). Further, the setting value of the parameter n can be adjusted so as to control a rate at which the origin is moved so as to approach the destination target coordinates (that is, a rate at which a length indicated by a stick value is changed so as to approach a predetermined distance R when the length indicated by the stick value is larger than the predetermined distance R). Hereinafter, a relationship between the parameters m and n, and a position to which the origin is drawn will be described with reference to FIG. 11. FIG. 11 is a diagram for explaining a position of the origin which is drawn according to the parameters m and n.

In FIG. 11, the player touch-operates the touch panel 13 within a limited range A5 set around an origin O5, thereby setting a designated point U5. Then, the designated point is moved to the right, and the player touch-operates the touch panel 13 outside the limited range A5 on a straight line s1 in the rightward direction from the designated point U5, thereby setting a designated point U6. The origin is drawn according to the origin O5, the designated points U5 and U6 to position an origin O6 and set a limited range A6 based on the origin O6. FIG. 11 shows the origin O6 and the limited range A6 in the case of the parameter m=0 and the parameter n=1.

As described above, a direction in which the origin is drawn is adjusted according to the parameter m, and m≧0. The greater the setting value of the parameter m is, the closer the origin is drawn to the backward position of the designated point which moves from U5 to U6 along the straight line s1. In the case of m=0, a direction in which the origin O5 is connected with the designated point U6 (a straight line s2) is set as a direction in which the origin is drawn. Here, in order to draw the origin as close to the straight line s1 as possible, the calculation may be performed assuming that the designated point U6 is further moved along the direction of the straight line s1. Therefore, as described in the step 71, when a drawing direction (px, py) is obtained on the basis of the difference between the origin O5 and the designated point U6, a value which is obtained by multiplying a motion vector (uvx, uvy) of the designated point by a predetermined rate (parameter m) is added to the designated point coordinates so as to obtain a value which is obtained when the designated point U6 is further moved. Accordingly, the origin is drawn into a range which is interposed between the straight lines s1 and s2 according to the setting value of the parameter m, that is, the destination target coordinates are set in the range which is interposed between the straight lines s1 and s2. Further, as is apparent from the above-described formula, the destination target coordinates are set as a position which is a predetermined distance (R) apart from the designated point coordinates, thereby resulting in the destination target coordinates being determined as any point on an arc ar1 shown in FIG. 11. In the case of m=0, the destination target coordinates are set so as to be as close to an intersection of the straight line s2 and the arc ar1 as possible. In the case of m being infinitely great, the destination target coordinates are set on an intersection of the straight line s1 and the arc ar1. When m is greater than a predetermined value, the drawing direction may be set so as to match the drawing direction (px, py) with (uvx, uvy). Thereby, when m is greater than the predetermined value, the destination target coordinates can be set on an intersection of the straight line s2 and the arc ar1.

On the other hand, as described above, a rate at which the origin is drawn to the destination target coordinates can be adjusted according to the parameter n, and 0<n≦1. In the case of n=1, the origin is moved to the destination target coordinates. In the case of 0<n<1, the origin is moved to any point on a line segment by which the origin is connected with the destination target coordinates (exclusive of both ends). The point to which the origin is moved on the line segment depends on the value n. The smaller n is, the closer a selected point is to the current origin. The greater n is, the closer a selected point is to the destination target coordinates.

Accordingly, the setting values of parameters m and n are adjusted, thereby drawing (moving) the origin to a position within an area a shown in FIG. 11. The area a is an area which is surrounded by the arc ar1 which is obtained by cutting, with the straight lines s1 and s2, a circumference of a circle having a radius R and having the designated point U6 at the center thereof, and the straight lines each connecting one end of the arc ar1 with the origin O5 (not including the origin O5).

Further, when the drawing direction (px, py) is obtained, and then the moved origin coordinates (ox, oy) are obtained from ox=ux+(px/L3)*n′ oy=uy+(py/L3)*n′ (R≦n′<L4 (the length between O5 and U6)), the origin can be moved to a position within an area β shown in FIG. 12. The area β is a range which is interposed between the straight lines s1 and s2, which form an acute angle, as well as a range which is interposed between the arc ar1 of a circle having a radius R and having the designated point U6 at the center thereof, and the arc ar2 of a circle having a radius of the length between the designated point U6 and the origin O5 and having the designated point U6 at the center thereof (exclusive of points on the arc ar2).

As described above, a position into which the origin is drawn can be adjusted according to the setting values of the parameters m and n (or n′), and a position into which the origin is drawn can be adjusted as an optimal value according to the response or operability for each game.

Conversely, a case where the origin is moved to other than the area β will be described with reference to FIG. 12. In a case where the origin is moved to between the arc ar1 and the designated coordinates U6 (for example, a point O7 shown in FIG. 12), while the player is moving the pressing point in the direction in which the length of the stick input value is increased, the length of the input value is reduced, which does not match the player's controllability. Further, in a case where the origin is moved to a position in front of the straight line s1 on the FIG. 12 (for example, a point O8 shown in FIG. 12), while the player touches a point which is in the diagonally right forward direction from the origin, and changes the touch position to the right, the stick input value has a right backward direction, which does not match the player's controllability. Moreover, in a case where the origin is moved to a position in the backward direction from the straight line s2 on the FIG. 12 (for example, a point O9 shown in FIG. 12), while the player moves the touch position to the right, the rightward direction component of the stick input value is reduced, which does not match the player's controllability. In addition, in a case where the origin is moved beyond the arc ar2 in the direction away from the designated point coordinates U6, the distance between the origin and the designated point coordinates becomes longer. As described above, the player's controllability is substantially different between a case where the origin is moved into the area β and a case where the origin is moved to other than the area β.

As described above, according to the present example embodiment, an origin being set on the touch panel is drawn and moved according to the player's touch-operation so as to emulate a joystick operation, and therefore the touch-operation can be matched with the player's controllability. Further, since the distance between the point at which the touch panel is touch-operated and the origin does not become longer than is necessary, the response to the operation can be improved.

The stick value obtained in step 47 is used for processing a game as for a conventional game for which a joystick is used.

Further, although in this embodiment the origin is drawn before the stick value is obtained, the origin may be drawn after the stick vale is obtained, and when the stick value is obtained next time, the origin having been drawn may be utilized. However, in general, it is preferable that the origin is drawn before the stick value is obtained.

An image of at least one of the origin and the limited range set around the origin, which are described in the aforementioned embodiment, may be displayed on the second LCD 12. According to the present invention, while the player can feel and know the position of the origin without visually checking the touch panel 13, when the origin or the limited range is displayed on the second LCD 12 covered by the touch panel 13, the position of the origin or the limited range of the touch panel 13 can be further displayed to the player in real time.

Further, in this embodiment, a touch point is arbitrarily positioned in a tolerance range having a designated point at the center thereof, and when the touch point deviates beyond the tolerance range, the tolerance range is moved according to the movement of the touch point, and consequently the designated point is moved, thereby making hand jiggling correction for the touch point. However, when the effect of the hand jiggling correction is not required, the hand jiggling correction is not necessarily required to be made. In this case, a touch point is handled as a designated point as it is, and no tolerance range is set and the processing of the step 43 is not performed. In this way, even when a touch point is handled as a designated point as it is, the effect of the present invention can be similarly achieved.

Further, in the processing of the step 42, while a position at which the player initially touch-operates the touch panel 13 is set as an origin, a predetermined position (for example, a center) on the touch panel 13 may be set as an initial position of an origin. In this case, the origin and the designated point can be set when the player initially touch-operates the touch panel 13, and thereby an operation in which a joystick is emulated can be quickly started.

Further, in the flow chart shown in FIG. 3, when the player stops touch-operating the touch panel 13 (No in step 40), the stick value is set as neutral. However, the stick value which has been set before stopping the touch-operation may be continuously handled as a game parameter until the next touch-operation is carried out or until a predetermined time elapses. In a case where the stick value is continuously handled as a game parameter until the next touch-operation is carried out, it is not required for the player to continue the same touch-operation for a long time, and thereby the same operation can be easily continued. Further, in a case where the stick value is continuously handled as a game parameter until a predetermined time elapses, even when the touch-operation on the touch panel 13 is interrupted against the player's intention (for example, even when the player carelessly moves his fingers off the touch panel), the player can continue the game feeling as if no interruption occurred.

Moreover, in the flow chart shown in FIG. 3, when the player stops touch-operating the touch panel 13 and then carries out a touch-operation again, an origin is newly set. However, when the next touch-operation is carried out, a relative positional relationship between a designated point and an origin may be continuously used. For example, the relative positional relationship between the origin and the designated point, which are used in step 47 before stopping the touch-operation, is stored, and when the touch-operation is restarted, the touch point may be set as the designated point. The relative positional relationship having been stored is used to set an origin on the basis of the designated point. In general, when the player touch-operates an area other than the touch panel 13 during the touch-operation on the touch panel 13, the player touch-operates a different position on the touch panel 13 again and attempts to continue the same operation. Also when the touch-operation is carried out again as described above, since the relative positional relationship between the origin and the designated point is maintained, the player can enjoy the game without the operation being interrupted. Further, the origin can be also set outside the touch panel 13, and thereby a wide range of game operations can be provided.

In addition, only when the time from stopping the touch-operation to carrying out the touch-operation again is within a predetermined time, the relative positional relationship between the designated point and the origin is maintained, and when the time is beyond the predetermined time, the retouched point may be set as a new origin. In this case, the origin is prevented from being reset when the player unintentionally releases his fingers for a short time as well as the origin can be reset when the player intentionally releases his fingers (when the player releases his fingers for more than a predetermined time period).

Further, the origin according to this embodiment does not have to be a touch panel origin. That is, the touch panel origin is fixed and another reference point may be used and changed as a reference for stick input.

While in this embodiment a touch panel is used as an input device for carrying out an operation in which a joystick is emulated, other pointing devices can be used. Here, the pointing device is an input device which designates an input position or coordinates on a screen. For example, when a mouse, a track pad, a track ball or the like is used as an input device and information concerning a screen coordinate system, which is obtained on the basis of an output value which is outputted by the input device, is used, the present invention can be realized in a similar manner. In a case where a pointing device such as a mouse is used, a touch state and a non-touch state correspond to an ON and an OFF of a click button, respectively, and the game apparatus or the like may calculate coordinates on the basis of an output value which is outputted from the mouse or the like.

In addition, in this embodiment, the touch panel 13 is integrated into the game apparatus 1. Needless to say, however, also when the game apparatus and the touch panel are separately provided, the present invention can be realized. Further, while in this embodiment two display devices are provided, the number of display devices provided can be only one. That is, in this embodiment, it is also possible to provide only the touch panel 13 without the second LCD 12 being provided. In addition, in this embodiment, the second LCD 12 is not provided and the touch panel 13 may be provided on the upper principal face of the first LCD 11.

Moreover, while in this embodiment the touch panel 13 is integrated into the game apparatus 1, the touch panel is used as one of input devices for an information processing apparatus such as a typical personal computer. In this case, a program executed by the computer in the information processing apparatus is not limited to a game program which is typically used for a game, and the program is a general-purpose program in which the stick value obtained in the above-described manner is used for processing in the information processing apparatus.

Further, in this embodiment, when designated point coordinates deviate beyond the limited range, an origin is drawn. However, the origin may be drawn under another condition. For example, when an angle between the origin and the designated point coordinates is different from the angle obtained at the previous input, or when an angle between the origin and the designated point coordinates is greater than a predetermined angle, the origin may be drawn.

While the present example embodiment has been described in detail, the foregoing description is in all aspects illustrative and not restrictive. It is understood that numerous other modifications and variations can be devised without departing form the scope of the example embodiment. 

1. A storage medium having stored thereon a game program executed by a computer in a game apparatus which is operated using a pointing device for outputting coordinate information being based on a given coordinate system and being designated according to an operation of a player, wherein the computer is operable to execute: reference coordinate setting for setting reference coordinates in the coordinate system; designated coordinate setting for repeatedly obtaining coordinate information which is outputted from the pointing device and repeatedly updating designated coordinates in the coordinate system based on the coordinate information which has been repeatedly obtained from the pointing device; reference coordinate changing for repeatedly updating a position of the reference coordinates so as to approach latest coordinates among the designated coordinates which have been repeatedly updated; and game control for controlling the game based on at least one of an input direction which is a direction from the reference coordinates to the designated coordinates and an input distance which is a distance between the reference coordinates and the designated coordinates, wherein in the reference coordinate changing, the position of the reference coordinates is changed so as to approach the designated coordinates when a predetermined condition is satisfied, wherein the predetermined condition which is used in the reference coordinate changing is a condition that the designated coordinates are outside a predetermined area based on the reference coordinates, wherein in the game control, the game is controlled based on at least the input distance, and when the designated coordinates are outside the predetermined area based on the reference coordinates, the input distance is set as a predetermined distance from the reference coordinates to the boundary of the predetermined area, and in the reference coordinate changing, the position of the reference coordinates is changed so as to approach the designated coordinates when the designated coordinates are outside the predetermined area based on the reference coordinates.
 2. The storage medium having the game program stored thereon according to claim 1, wherein the predetermined area is formed as a circular area having the reference coordinates at the center thereof.
 3. The storage medium having the game program stored thereon according to claim 2, wherein in the reference coordinate changing, the position of the reference coordinates is changed so as to approach the designated coordinates such that the distance between the designated coordinates and the reference coordinates has a same value as a predetermined distance.
 4. The storage medium having the game program stored thereon according to claim 1, wherein in the reference coordinate changing, the position of the reference coordinates is changed so as to approach the designated coordinates along a line segment connecting the designated coordinates with the reference coordinates.
 5. The storage medium having the game program stored thereon according to claim 1, wherein in the reference coordinate changing, the position of the reference coordinates is changed so as to be in the area which is surrounded by: a first arc of a circle having the designated coordinates at the center thereof and having a radius of a predetermined distance; a second arc of a circle having the designated coordinates at the center thereof and having a radius of a length between the designated coordinates and the reference coordinates; a line segment connecting the designated coordinates with the reference coordinates; and a straight line passing through designated coordinates which is currently set and the designated coordinates having been previously set in the designated coordinate setting.
 6. The storage medium having the game program stored thereon according to claim 5, wherein in the reference coordinate changing, the position of the reference coordinates is changed so as to be on the first arc which is interposed between the line segment and the straight line.
 7. The storage medium having the game program stored thereon according to claim 5, wherein in the reference coordinate changing, the position of the reference coordinates is changed so as to be at a position other than points on the line segment.
 8. The storage medium having the game program stored thereon according to claim 5, wherein in the reference coordinate changing, the position of the reference coordinates is changed such that the larger the movement distance between the designated coordinates being currently set and the designated coordinates having been previously set is, the closer to the straight line the reference coordinates are.
 9. The storage medium having the game program stored thereon according to claim 1, wherein the computer is further operable to execute adjacent area setting for setting an adjacent area around the designated coordinates which is set based on the coordinate information outputted from the pointing device, and in the designated coordinate setting, when a position indicated by the coordinate information which is newly outputted from the pointing device is within the adjacent area, the designated coordinates are not changed, and when a position indicated by the coordinate information which is newly outputted is outside the adjacent area, the designated coordinates are changed based on the position indicated by the coordinate information.
 10. The storage medium having the game program stored thereon according to claim 1, wherein the computer is further operable to execute positional relationship storage for storing, when an output of the coordinate information from the pointing device is stopped, a relative positional relationship between the designated coordinates and the reference coordinates which are set before the output is stopped, in the designated coordinate setting, a position indicated by the earliest coordinate information which is outputted from the pointing device after the output is stopped is set as designated coordinates in the coordinate system, and in the reference coordinate setting, reference coordinates are set in the coordinate system based on the relative positional relationship having been stored in the positional relationship storage using as a reference a position indicated by the earliest coordinate information.
 11. The storage medium having the game program stored thereon according to claim 1, wherein in the game control, when the output of the coordinate information from the pointing device is stopped, the game is continuously controlled based on at least one of the input direction and the input distance obtained according to the designated coordinates and the reference coordinates, which are set before the output is stopped.
 12. The storage medium having the game program stored thereon according to claim 1, wherein the game apparatus comprises a display which is covered by the pointing device, and the computer is further operable to execute reference coordinate position display for displaying an image indicating the position of the reference coordinates on the display.
 13. A game apparatus which is operated using a pointing device for outputting coordinate information being based on a given coordinate system and being designated according to an operation of a player, comprising: reference coordinate setting programmed logic circuitry for setting reference coordinates in the coordinate system; designated coordinate setting programmed logic circuitry for repeatedly obtaining coordinate information which is outputted from the pointing device and repeatedly updating designated coordinates in the coordinate system based on the coordinate information which has been repeatedly obtained from the pointing device; reference coordinate changing programmed logic circuitry for repeatedly updating a position of the reference coordinates so as to approach latest coordinates among the designated coordinates which have been repeatedly updated; and game control programmed logic circuitry for controlling the game based on at least one of an input direction which is a direction from the reference coordinates to the designated coordinates and an input distance which is a distance between the reference coordinates and the designated coordinates, wherein in the reference coordinate changing programmed logic circuitry, the position of the reference coordinates is changed so as to approach the designated coordinates when a predetermined condition is satisfied, wherein the predetermined condition which is used in the reference coordinate changing programmed logic circuitry is a condition that the designated coordinates are outside a predetermined area based on the reference coordinates, wherein in the game control programmed logic circuitry, the game is controlled based on at least the input distance, and when the designated coordinates are outside the predetermined area based on the reference coordinates, the input distance is set as a predetermined distance from the reference coordinates to the boundary of the predetermined area, and in the reference coordinate changing programmed logic circuitry, the position of the reference coordinates is changed so as to approach the designated coordinates when the designated coordinates are outside the predetermined area based on the reference coordinates.
 14. An input device for inputting information to a game apparatus according to an operation of a player, comprising: coordinate information output programmed logic circuitry for outputting coordinate information being based on a given coordinate system and being designated according to the operation of the player; reference coordinate setting programmed logic circuitry for setting reference coordinates in the coordinate system; designated coordinate setting programmed logic circuitry for repeatedly obtaining coordinate information which is outputted from the coordinate information output programmed logic circuitry and repeatedly updating designated coordinates in the coordinate system based on the coordinate information which has been repeatedly obtained from the coordinate information output programmed logic circuitry; and reference coordinate changing programmed logic circuitry for repeatedly updating a position of the reference coordinates so as to approach latest coordinates among the designated coordinates which have been repeatedly updated, wherein the game apparatus controls the game based on at least one of an input direction which is a direction from the reference coordinates to the designated coordinates and an input distance which is a distance between the reference coordinates and the designated coordinates, wherein in the reference coordinate changing programmed logic circuitry, the position of the reference coordinates is changed so as to approach the designated coordinates when a predetermined condition is satisfied, wherein the predetermined condition which is used in the reference coordinate changing is a condition that the designated coordinates are outside a predetermined area based on the reference coordinates, wherein the game is controlled based on at least the input distance, and when the designated coordinates are outside the predetermined area based on the reference coordinates, the input distance is set as a predetermined distance from the reference coordinates to the boundary of the predetermined area, and in the reference coordinate changing programmed logic circuitry, the position of the reference coordinates is changed so as to approach the designated coordinates when the designated coordinates are outside the predetermined area based on the reference coordinates.
 15. A storage medium having stored thereon a program executed by a computer in an information processing apparatus which is operated using a pointing device for outputting coordinate information being based on a given coordinate system and being designated according to an operation of a user, wherein the computer is operable to execute: reference coordinate setting for setting reference coordinates in the coordinate system; designated coordinate setting for repeatedly obtaining coordinate information which is outputted from the pointing device and repeatedly updating designated coordinates in the coordinate system based on the coordinate information which has been repeatedly obtained from the pointing device; reference coordinate changing for repeatedly updating a position of the reference coordinates so as to approach latest coordinates among the designated coordinates which have been repeatedly updated; and operation processing for processing an operation based on at least one of an input direction which is a direction from the reference coordinates to the designated coordinates and an input distance which is a distance between the reference coordinates and the designated coordinates, wherein in the reference coordinate changing, the position of the reference coordinates is changed so as to approach the designated coordinates when a predetermined condition is satisfied, wherein the predetermined condition which is used in the reference coordinate changing is a condition that the designated coordinates are outside a predetermined area based on the reference coordinates, wherein in the operation processing, the operation is processed based on at least the input distance, and when the designated coordinates are outside the predetermined area based on the reference coordinates, the input distance is set as a predetermined distance from the reference coordinates to the boundary of the predetermined area, and in the reference coordinate changing, the position of the reference coordinates is changed so as to approach the designated coordinates when the designated coordinates are outside the predetermined area based on the reference coordinates. 